/*
 * RealTimeQueryProcessor.h
 *
 *  Created on: Oct 22, 2011
 *      Author: gassa
 */

#ifndef REALTIMEQUERYPROCESSOR_H_
#define REALTIMEQUERYPROCESSOR_H_

#include <string>
#include <vector>
#include "IQueryProcessor.h"
#include "../include/CUtilities.h"
#include "../DocumentParsers/CWhiteSpaceParser.h"

using namespace std;

class RealTimeQueryProcessor: public IQueryProcessor {
private:
	static bool instanceFlag;
	static RealTimeQueryProcessor* instance;
	string queryString;
	RealTimeQueryProcessor();

public:
	/**
	 * @brief static
	 */
	inline static RealTimeQueryProcessor* getInstance() {
		if (!instanceFlag) {
			instance = new RealTimeQueryProcessor();
			return instance;
		}
		return instance;
	}
	virtual ~RealTimeQueryProcessor();
	void setQueryString(string queryString);
	vector<QueryRepresentation> processQuery();
	QueryRepresentation queryToTerms(string query);
};

#endif /* REALTIMEQUERYPROCESSOR_H_ */
